package cn.monkey.family.data.context;

import cn.monkey.family.data.http.HttpHeaderConstants;

import java.lang.annotation.*;

@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Context {

    Option authorization() default @Option(value = HttpHeaderConstants.AUTHORIZATION_KEY);

    Option orgId() default @Option(value = HttpHeaderConstants.ORG_ID_KEY);

    Option platformId() default @Option(value = HttpHeaderConstants.PLATFORM_ID_KEY);

    Option traceId() default @Option(value = HttpHeaderConstants.TRACE_ID_KEY);


    @interface Option {
        String value() default "";

        boolean required() default true;
    }

}
